package action.common;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import dao.common.SellSituationDao;
import dao.common.StockPlanDao;
import model.common.SellSituation;
import model.common.StockPlan;

public class SellSituationAction {

private  SellSituation s;
	
	public void add(SellSituation s) throws Exception{
		SellSituationDao dao =new SellSituationDao();
		dao.addSellSituation(s);
		
	}
	
	public void get(Integer goodsId) throws Exception{
		SellSituationDao dao =new SellSituationDao();
		dao.get(goodsId);
	}
	
	public void search(Integer sellingId) throws SQLException{
		SellSituationDao dao =new SellSituationDao();
		dao.search(sellingId);
	}
	
	public void edit(SellSituation s) throws SQLException{
		SellSituationDao dao =new SellSituationDao();
		dao.updateSellSituation(s);
	}
	
	public void del(Integer goodsId) throws SQLException{

		SellSituationDao dao =new SellSituationDao();
		dao.deleteSellSituation(goodsId);
	}
	
	public List<SellSituation> query(List<Map<String, Object>> params) throws Exception{
		SellSituationDao dao =new SellSituationDao();
		return dao.query(params);
		
	}
}
